<?php

namespace api\verificationAccount\controller;

class AdminIndexController extends \Aaa\verificationAccount\controller\AdminIndexController {

    protected $baseField = [
        [
            'field' => 'id',
            'name' => 'ID',
        ],
        [
            'field' => 'type',
            'name' => '类型',
            'type' => 'radio',
            'options' => [
                ['name' => '客服', 'value' => 0],
                ['name' => '黑号', 'value' => 1],
            ],
        ],
        [
            'field' => 'account',
            'name' => '账号',
        ],
        [
            'field' => 'content',
            'name' => '说明',
            'type' => 'textarea',
        ],
        [
            'field' => 'create_time',
            'name' => '添加时间',
            'type' => 'time',
        ],
        [
            'field' => 'update_time',
            'name' => '更新时间',
            'type' => 'time',
        ],
        [
            'field' => 'remark',
            'name' => '备注',
        ],
    ];

    protected function beforeIndex() {
        $this->actionField = ['id', 'type', 'account', 'content', 'create_time', 'update_time', 'remark',];
        $this->searchField = [
            'common' => [
                'id' => 'accurate',
                'type' => 'accurate',
                'account' => 'fuzzy',
                'content' => 'fuzzy',
                'remark' => 'fuzzy',
            ],
            'time' => ['create_time', 'update_time',],
        ];
    }

    protected function beforeAdd() {
        $this->actionField = ['type', 'account', 'content', 'remark',];
    }

    protected function beforeEdit() {
        $this->beforeAdd();
    }


}
